projects
/
cargo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7bcdb91
)
Fix failure on second run of 'cargo test'
author
Brian Koropoff
<bkoropoff@gmail.com>
Sun, 20 Jul 2014 22:11:41 +0000
(15:11 -0700)
committer
Brian Koropoff
<bkoropoff@gmail.com>
Sun, 20 Jul 2014 22:11:41 +0000
(15:11 -0700)
Generate the right target filename for rlibs built in test
mode so that they are correctly moved back out of the old-root
directory.
src/cargo/ops/cargo_rustc/context.rs
patch
|
blob
|
history
diff --git
a/src/cargo/ops/cargo_rustc/context.rs
b/src/cargo/ops/cargo_rustc/context.rs
index 341be4c5aa96c26bf395ba828cda05d5134cbd62..cdaa1fcd1d7ba7b9f1079806215bae9ba9ff2d2b 100644
(file)
--- a/
src/cargo/ops/cargo_rustc/context.rs
+++ b/
src/cargo/ops/cargo_rustc/context.rs
@@
-180,7
+180,11
@@
impl<'a, 'b> Context<'a, 'b> {
ret.push(format!("{}{}{}", prefix, stem, suffix));
}
if target.is_rlib() {
- ret.push(format!("lib{}.rlib", stem));
+ if target.get_profile().is_test() {
+ ret.push(format!("{}{}", stem, self.target_exe));
+ } else {
+ ret.push(format!("lib{}.rlib", stem));
+ }
}
if target.is_bin() {
ret.push(format!("{}{}", stem, self.target_exe));